package com.hudongwx.food;

import android.app.Application;
import android.content.SharedPreferences;

import com.hudongwx.food.activity.MainActivity;

import org.xutils.x;

import java.util.List;

/**
 * Author:降初
 * DateTime:16-12-12 下午3:09
 */
public class MyApplication extends Application{

    public static String Uid = "23";//记录登陆状态
    private static SharedPreferences sharedPreferences;
    @Override
    public void onCreate() {
        super.onCreate();
        sharedPreferences=getSharedPreferences("uid",MODE_PRIVATE);
        x.Ext.init(this);
        x.Ext.setDebug(true);
    }
public static void storage(String uid){
    SharedPreferences.Editor editor = sharedPreferences.edit();
    editor.putString("Uid",uid);
    editor.commit();
}
    public static String getStorage(String what){
        String suuta = sharedPreferences.getString(what,"没有数据");
        return suuta;
    }
}
